1. Field of the Invention
The present invention relates to an image processing apparatus and an image processing method for compressing dynamic ranges of images into a dynamic range of an output device such as a printer, for outputting the images. The present invention also relates to a program for causing a computer to execute the image processing method.
2. Description of the Related Art
Conventionally, images obtained by taking photographs of subjects with photography devices such as digital cameras and images obtained by photo-electrically reading images recorded on films such as negative films and reversible films, prints or the like are reproduced at reproduction devices such as printers. When the images are reproduced at the reproduction devices, dynamic ranges of the images are compressed into dynamic ranges of the reproduction devices to prevent loss of gradation in highlights and/or shadows of the images.
As an example of the dynamic range compression method, a method is proposed, wherein filtering processing is performed on an image by using a low-pass filter, an unsharp image only showing low spatial frequency structures included in the image is produced, and the dynamic range of the image is compressed by using the unsharp image. Accordingly, loss of gradation in both highlights and shadows of the image is prevented while contrast in fine texture in the highlights and the shadows of the images is preserved (Refer to U.S. Pat. No. 6,101,273).
A method is also proposed, wherein when a dynamic range is compressed by using an unsharp image, an IIR (Infinite Impulse Response) filter is used to save a line memory of a filter (Refer to U.S Pat. No. 5,905,817). Further, a method is also proposed, wherein a plurality of unsharp images in various frequency bands is produced and a dynamic range is compressed by using a cumulative signal of the plurality of unsharp images produced to prevent generation of artifacts at edges in a processed image (Refer to U.S. Pat. No. 5,991,457).
In the methods disclosed in U.S. Pat. Nos. 5,905,817 and 5,991,457, the line memory of the filter may be saved and the image quality of the processed image may be improved. However, an amount of operations for compressing the dynamic range is large and a long time is required for processing.
Further, in the aforementioned method of compressing the dynamic range by using the unsharp image, when the unsharp image is produced in the vicinity of edges where the density of the image sharply changes, the edges are included in an area to which a mask for producing the unsharp image is applied. Therefore, especially if a degree of dynamic range compression is high, that is, a correction amount of the dynamic range is large, the unsharp image in the vicinity of the edges is influenced by the density of the edges. Therefore, overshoot, undershoot or an artifact such as a false contour are generated in the image obtained by compressing the dynamic range by using the unsharp image, and the image quality of the processed image drops.
In the method disclosed in U.S. Pat. No. 5,905,817, generation of artifacts may be prevented and the image quality of the processed image may be improved. However, since the plurality of unsharp images in various frequency bands is produced, the amount of operations for compressing the dynamic range is large and a long time is required for processing.